﻿
namespace EasyNet.Solr.Commons.Params
{
    public struct CoreAdminParams
    {
        /// <summary>
        /// What Core are we talking about
        /// </summary>
        public const string CORE = "core";

        /// <summary>
        /// Persistent -- should it save the cores state?
        /// </summary>
        public const string PERSISTENT = "persistent";
        
        /// <summary>
        /// If you rename something, what is the new name
        /// </summary>
        public const string NAME = "name";

        /// <summary>
        /// If you rename something, what is the new name
        /// </summary>
        public const string DATA_DIR = "dataDir";

        /// <summary>
        /// Name of the other core in actions involving 2 cores
        /// </summary>
        public const string OTHER = "other";

        /// <summary>
        /// What action
        /// </summary>
        public const string ACTION = "action";

        /// <summary>
        /// If you specify a schema, what is its name
        /// </summary>
        public const string SCHEMA = "schema";

        /// <summary>
        /// If you specify a config, what is its name
        /// </summary>
        public const string CONFIG = "config";

        /// <summary>
        /// Specifies a core instance dir.
        /// </summary>
        public const string INSTANCE_DIR = "instanceDir";

        /// <summary>
        /// If you specify a file, what is its name
        /// </summary>
        public const string FILE = "file";

        /// <summary>
        /// If you merge indexes, what are the index directories.
        /// The directories are specified by multiple indexDir parameters.
        /// </summary>
        public const string INDEX_DIR = "indexDir";

        /// <summary>
        /// The collection name in solr cloud
        /// </summary>
        public const string COLLECTION = "collection";

        /// <summary>
        /// The shard id in solr cloud
        /// </summary>
        public const string SHARD = "shard";

        /// <summary>
        /// Prefix for core property name=value pair
        /// </summary>
        public const string PROPERTY_PREFIX = "property.";

        /// <summary>
        /// If you unload a core, delete the index too
        /// </summary>
        public const string DELETE_INDEX = "deleteIndex";

        public enum CoreAdminAction
        {
            STATUS,
            LOAD,
            UNLOAD,
            RELOAD,
            CREATE,
            PERSIST,
            SWAP,
            RENAME,
            MERGEINDEXES
        }
    }
}
